package util;

import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStreamReader;
import java.nio.charset.StandardCharsets;
import java.util.Properties;

public class ProfileReader {
    public static Properties readProfile(String fileName) {
        Properties properties = new Properties();
        File file = new File(fileName);
        try (FileInputStream fis = new FileInputStream(file);
             InputStreamReader isr = new InputStreamReader(fis, StandardCharsets.UTF_8)) {
            properties.load(isr);
        } catch (IOException e) {
            e.printStackTrace();
        }
        return properties;
    }
}
